package com.nfc.base.ServiceImp;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.nfc.base.Dao.UserDao;
import com.nfc.base.Entity.User;
import com.nfc.base.Service.UserService;

@Service("userService")
public class UserServiceImp implements UserService {

	@Autowired
	UserDao userDao;
	public void create(User user) {

		user.setCreated_on(new Date());
		user.setChanged_on(new Date());
		userDao.create(user);
		
	}

	public void update(User user) {
		user.setChanged_on(new Date());
		userDao.update(user);
	}

	public void delete(Integer user_id) {
		userDao.delete(user_id);
		
	}

	public User getUserById(Integer user_id) {
		// TODO Auto-generated method stub
		return null;
	}

	public List<User> getUserList(User user) {
		return userDao.getList(user);
	}

}
